//
//  HJTools.h
//  KaiChat
//
//  Created by lx on 2023/10/17.
//

#import <Foundation/Foundation.h>
#import "HJUserModel.h"

NS_ASSUME_NONNULL_BEGIN


@class MBProgressHUD, HJVersionUpdate;

@interface HJTools : NSObject


+ (HJTools *)tool;


@property (nonatomic, weak, nullable) UIViewController *imagePickerController;
@property (nonatomic, weak, nullable) UIViewController *alertController;
@property (nonatomic, weak, nullable) MBProgressHUD *currentHud;
@property (nonatomic, weak, nullable) HJVersionUpdate *versionUpdate;
@property (copy, nonatomic) NSString *latitude;
@property (copy, nonatomic) NSString *longitude;

@property (nonatomic, strong, nullable) NSString *inviteUserId;
@property (nonatomic, strong) HJUserModel *userModel;
@property (nonatomic, assign) BOOL isRememberPassword;

+ (BOOL)verifyPassword:(NSString *)password;
+ (BOOL)verifyPayPassword:(NSString *)password;

+ (UINavigationController *)currentNavController;
+ (UIViewController *)currentViewController;
+ (UIViewController *)rootViewController;
+ (UINavigationController *)currentNav;
+ (NSString *)convertFileSize:(long long)size;

+ (UIImage *)getVideoFirstViewImageWithURL:(NSURL *)URL;
+ (UIImage *)getVideoFirstViewImageWithURL:(NSURL *)URL header:(NSDictionary *)header;
+ (UIImage *)getIMVideoFirstViewImageWithURL:(NSURL *)URL;

+ (NSString *)videoLengthWithSeconds:(long)seconds;

+ (BOOL)writeImage:(UIImage *)image toLocalPath:(NSString *)localPath;
+ (BOOL)writeIMImage:(UIImage *)image toLocalPath:(NSString *)localPath;
+ (BOOL)writeOriginalImage:(UIImage *)image toLocalPath:(NSString *)localPath;
+ (BOOL)writeImageData:(NSData *)imageData toLocalPath:(NSString *)localPath;
+ (BOOL)writeOriginalImageData:(NSData *)imageData toLocalPath:(NSString *)localPath;
+ (NSString *)convertDateToString:(NSDate *)date;
+ (NSString *)convertDateChatCellToString:(NSDate *)date;
+ (NSString *)convertDateChatSessionListToString:(NSDate *)date;
+ (void)copyStringToPasteboard:(NSString *)string;
+ (UIImage *)convertViewToImage:(UIView *)view;
+ (void)removeImageFromMemoryForURLs:(NSArray *)URLs;
+ (NSDictionary *)parseQueryForURL:(NSURL *)URL;
+ (BOOL)isURL:(NSString *)string;
 

@end

NS_ASSUME_NONNULL_END
